package com.kaibes.platform.article.pojo;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.kaibes.core.base.annotation.Description;
import com.kaibes.core.validator.NotBlankButNull;
import com.kaibes.platform.article.enums.ArticleStatus;
import com.kaibes.platform.article.enums.ArticleType;

import lombok.Data;

@Data
@Description("文章信息")
public class ArticleUpdate {
    
    @Description("文章标题")
    @NotBlankButNull(message = "标题不能为空")
    private String title;
    @Description("文章内容")
    @NotBlankButNull(message = "内容不能为空")
    private String content;
    @Description("文章封面")
    private String thumbnail;
    @Description("文章分类ID")
    @Min(value = 1, message = "分类不能为空")
    private Short categoryId;
    @Description("文章标签")
    private String tags;
    @Description("文章类型")
    @NotNull(message = "类型不能为空")
    private ArticleType type;
    @Description("文章状态")
    @NotNull(message = "状态不能为空")
    private ArticleStatus status;
    @Description("是否允许评论")
    @NotNull(message = "评论状态不能为空")
    private Boolean commentAble;
    @Description("是否置顶")
    private Boolean top;
}
